﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Automation.Provider;
using Windows.UI.Xaml.Input;

namespace com.IronOne.BoardPACWinApp.Extensions
{
    //public static class DoubleTapExtension
    //{
    //    public static bool GetIsFocused(DependencyObject obj)
    //    {
    //        return (bool)obj.GetValue(IsDoubleTappedProperty);
    //    }


    //    public static void SetIsFocused(DependencyObject obj, bool value)
    //    {
    //        obj.SetValue(IsDoubleTappedProperty, value);
    //    }


    //    public static readonly DependencyProperty IsDoubleTappedProperty =
    //        DependencyProperty.RegisterAttached(
    //         "IsDoubleTapped", typeof(bool), typeof(DoubleTapExtension),
    //         new PropertyMetadata(false, OnIsDoubleTapped));


    //    private static void OnIsDoubleTapped(DependencyObject d,
    //        DependencyPropertyChangedEventArgs e)
    //    {
    //        if ((bool)e.NewValue)
    //        {
    //            var uie = d as Windows.UI.Xaml.Controls.Control;
    //            DoubleTappedRoutedEventArgs a = new DoubleTappedRoutedEventArgs();
                
    //            if (uie != null)
    //            {
    //                uie.Focus(FocusState.Programmatic);
    //                IInvokeProvider invokeProv =
    //                                        a.GetPattern(PatternInterface.Invoke) as IInvokeProvider;
    //                invokeProv.Invoke();
    //            }
    //        }
    //    }
    //}
}
